﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;

namespace JasLib.Interop.Win32
{
    public static partial class DBGHELP
    {
        public const string DBGHELP_MODULE_NAME = "dbghelp.dll";

        [DllImport(DBGHELP_MODULE_NAME, EntryPoint = "ImageDirectoryEntryToData", SetLastError = true, CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode)]
        public static extern IntPtr ImageDirectoryEntryToData([In] IntPtr Base, bool MappedAsImage, IMAGE_DIRECTORY_ENTRY DirectoryEntry, out uint uiSize);

        [DllImport(DBGHELP_MODULE_NAME, EntryPoint = "ImageDirectoryEntryToDataEx", SetLastError = true, CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode)]
        public unsafe static extern IntPtr ImageDirectoryEntryToDataEx([In] IntPtr Base, bool MappedAsImage, IMAGE_DIRECTORY_ENTRY DirectoryEntry, out uint uiSize, out IntPtr FoundHeader);
    }
}
